<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<title>公路设施清单--${fns:getConfig('productName')}</title>
<%@ include file="/common/meta.jsp"%>
        <link rel="stylesheet" type="text/css" href="${ctx}/styles/css/default.css">
        <link href="${ctx}/styles/css/fileinput.css" media="all" rel="stylesheet" type="text/css" />
        <script src="${ctxStatic}/jquery/jquery-2.0.2.min.js" type="text/javascript"></script>
        <script src="${ctx}/js/fileinput.js" type="text/javascript"></script>
<!--         简体中文 -->
        <script src="${ctx}/js/zh.js" type="text/javascript"></script>
<!--         繁体中文 -->
        <script src="${ctx}/js/zh-TW.js" type="text/javascript"></script>
		<script src="${ctx}/js/bootstrap.min.js" type="text/javascript"></script>
<%@ include file="/common/jqGridHead.jsp"%>
<script src="${ctxStatic}/js/yh/dailySupervion.js" type="text/javascript"></script>

</head>
<body>
	<ul class="nav nav-tabs" style="display:none;">
		<c:forEach items="${list}" var="menu"  varStatus="idxStatus">
			<li class="${menu.tag eq tag?'active':''}">
				<a href="${ctx}/${menu.href}">
					<i class="icon icon-list" style="margin-right:10px"></i><span>${menu.name}</span>
				</a>
			</li>
		</c:forEach>
	</ul>
    <tags:message content="${msg}" />
	<form id="mainForm"  role="form" method="get" style="margin:3px 5px 0 5px;">
		<div class="breadcrumb form-search" style="padding:0;margin:5px 0 7px 0;background-color: #fff;height:30px;line-height:30px;">
			<div>
				<label>关键字:</label>
				<input type="text" style="height:22px;line-height:22px;width:205px;" oninput="queryForGrid('mainForm','jqGrid')" onporpertychange="queryForGrid('mainForm','jqGrid')"  name="filter_LIKES_roadCode_OR_roadName_OR_manageOrg_OR_type_OR_district_OR_byName" placeholder="道路名称或代码等关键字查询" />
			</div>
		</div>
	<table id="jqGrid"></table>
	<div id="jqGridPager"></div>
	</form>
	<script type="text/javascript">
		$(document).ready(function()
		{
			var jqgridH = $(window).height()-122;
			$("#jqGrid").jqGrid(
			{ url : '${ctx}/roadBasicInfo/list.do',
			  mtype : "GET",
			  datatype : "json",
			  page : 1,
			  viewrecords: true,
			  colModel :
			[
					{ label : '路线代码', name : 'roadCode', align : 'center', width : 120},
					{ label : '路线名称', name : 'roadName', align : 'center', width : 100},
					{ label : '现状路名', name : 'byName', align : 'center', width : 100},
					{ label : '路线类型', name : 'type', align : 'center', width : 100,sortable : true,formatter:function(cellValue){
						return Pengtu.buildCodeName(2201,cellValue);}},
					{ label : '路段序号', name : 'partOrder', align : 'center', width : 80},
					{ label : '起点地名', name : 'startName', align : 'center', width : 120},
					{ label : '起点桩号', name : 'startPegNum', align : 'center', width : 80,
						formatter:function(cellValue){
							return dateChange(cellValue);
						}
					},
					{ label : '止点地名', name : 'endName', align : 'center', width : 120},
					{ label : '止点桩号', name : 'endPegNum', align : 'center', width : 80,
						formatter:function(cellValue){
							return dateChange(cellValue);
						}
					},
					{ label : '技术等级', name : 'techGrade', align : 'center', width : 100,sortable : true,formatter:function(cellValue){
						return Pengtu.buildCodeName(2009,cellValue);}},
					{ label : '路面类型', name : 'pavementType', align : 'center', width : 100,sortable : true,formatter:function(cellValue){
						return Pengtu.buildCodeName(3006,cellValue);}},
					{ label : '路面宽度(m)', name : 'roadWidth', align : 'center', width : 90},
					{ label : '路基宽度(cm)', name : 'roadbedWidth', align : 'center', width : 90},
					{ label : '里程(km)', name : 'pavementLength', align : 'center', width : 90},
					{ label : '车道特征', name : 'pavementWay', align : 'center', width : 90,sortable : true,formatter:function(cellValue){
						return Pengtu.buildCodeName(2013,cellValue);}},
					{ label : '管养单位', name : 'manageOrg', align : 'center', width : 220},
					{ label : '所在地市', name : 'cityLocation', align : 'center', width : 90},
					{ label : '所在区县', name : 'district', align : 'center', width : 90,sortable : true,formatter:function(cellValue){
						return Pengtu.buildCodeName(2051,cellValue);}}
			], autowidth : false,width:$(window).width()-10, height : jqgridH,scrollOffset:0, shrinkToFit : 400, rowNum : 10, viewrecords : true, rownumbers : true,
			jsonReader:{
    			root: "result",
    			page: "currentPage",
    			total: "totalPages",
    			records: "totalCount",
    			repeatitems: true,
    			cell: "cell",
    			id: "id",
    			userdata: "userdata",
    			subgrid: {root:"results", repeatitems: true, cell:"cell"}
    		},
    		prmNames: {
				page:"pageNo",
				rows:"pageSize",
				sort: "orderBy",
				order: "order",
				search:"_search",
				nd:"nd", id:"id",
				oper:"oper",
				editoper:"edit",
				addoper:"add",
				deloper:"del",
				subgridid:"id",
				npage: null,
				totalrows:"totalCounts"
			}, 
			rowList :[10, 20,30], 
			pager : "#jqGridPager"
			});
			
			 $('#jqGrid').navGrid("#jqGridPager", {                
	                search: false, // show search button on the toolbar
	                add: false,
	                edit: false,
	                del: false,
	                refresh: true,
	                refreshtext:'刷新'
	            },
	            {}, // edit options
	            {}, // add options
	            {}, // delete options
	            { multipleSearch: true,multipleGroup: true} // search options - define multiple search
	            );

			$("#jqGrid").jqGrid('setGroupHeaders',
			{ useColSpanStyle : true, // 没有表头的列是否与表头列位置的空单元格合并
				});
			
			$("#searchmodfbox_jqGrid").css("width", "660px");
		});
	</script>


</body>
